<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var name = "ziqi"
        var person = {
            name: "xiaoxin",
            sayName() {
                console.log(name)
            }
        }
        person.sayName();   // 输出ziqi，说明在对象中不存在闭包的概念,在定义sayName的时候的词法作用域是window
    </script>
</body>

</html>